#ifndef ITEMHANDLER_H
#define ITEMHANDLER_H

#include <QObject>
#include <QMap>
#include "resource.h"
#include "category.h"
#include "techitem.h"

class ItemHandler : public QObject
{
    Q_OBJECT
public:
    explicit ItemHandler(QObject *parent = 0);

    void addResource(Resource *resource);
    Resource* getResource(int id);
    void removeResource(int id);

    void addCategory(Category* category);
    Category* getCategory(int id);
    void removeCategory(int id);

    void addTechItem(TechItem *techItem);
    TechItem* getTechItem(int id);
    void removeTechItem(int id);

signals:

public slots:

private:
    QMap<int, Resource*> resources;
    QMap<int, Category*> categories;
    QMap<int, TechItem*> techItems;

};

#endif // ITEMHANDLER_H
